home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr11 / intmemry.zip / MEMO1250.TXT < prev    next >
Text File  |  1992-06-24  |  7KB  |  113 lines

  1.  ╔═════════════════════════════════════════════════════════════════════════╗
  2.  ║                                                                         ║
  3.  ║                  DOS 5.0 and the High Memory Area                       ║
  4.  ║                                                                         ║
  5.  ╚═════════════════════════════════════════════════════════════════════════╝
  6.  
  7.  DOS 5.0 AND THE HIGH MEMORY AREA
  8.  
  9.      DOS 5.0 is the first DOS version to make use of the High Memory Area
  10.      (HMA), loading a significant portion of the DOS system files into this
  11.      memory. As a result, a 286 or later PC can show as much as a 46k gain
  12.      in free conventional memory after upgrading to DOS 5.0, simply because
  13.      much of resident DOS is now using HMA instead of conventional memory.
  14.  
  15.      History, Background
  16.  
  17.      Because DOS is essentially a REAL mode operating system, it limits
  18.      users to accessing only the address range below 1024k.  Even on systems
  19.      with 286 or later processors that can access megabytes of memory, the
  20.      640K limit still exists in the DOS world.
  21.  
  22.      There is, however, one small portion of EXTENDED memory (the memory
  23.      above 1024k) that 286 or later processors can access - even with the
  24.      processor in REAL mode.  This is the 64k of memory from 1024-1068k.
  25.  
  26.      To understand how this memory is accessed, it is necessary to look at
  27.      PC memory addressing in general.  The PC in REAL mode addresses memory
  28.      through a combination of a SEGMENT and an OFFSET. You could think of
  29.      this as giving a location by saying it was a certain number of yards
  30.      away (the segment) plus a certain number of feet (the offset).
  31.      Therefore, something that is at a segment of 7 yards and an offset of 2
  32.      feet would have an absolute distance (or address) of 23 feet.  Of
  33.      course you coud express the same location as a segment of 6 yards and
  34.      an offset of 5 feet.
  35.  
  36.      In REAL mode operation, any memory that can be addressed can be
  37.      described in a similar fashion.  The memory is located in a particular
  38.      SEGMENT, at a particular OFFSET from that segment.
  39.  
  40.      On 8086/8088-based computers, there is a maximum to the absolute
  41.      address of FFFFF.  This could be expressed as a location of SEGMENT
  42.      F000 plus OFFSET FFFF (F000:FFFF), or as a location of SEGMENT FFFF
  43.      with an OFFSET of 000F (FFFF:000F).  The question became, if you could
  44.      have a SEGMENT address of FFFF with an OFFSET address of 000F, what
  45.      happened when you added 1 to the OFFSET address, and it became 0010?
  46.      This was acceptable register math, but it exceeded the maximum memory
  47.      the CPU could address.
  48.  
  49.      The answer was, you "wrapped" back into the bottom of conventional
  50.      memory.  Consequently, this was a boundary condition that became known,
  51.      and the PCs using the 8086 and 8088 processors were designed with this
  52.      in mind.
  53.  
  54.      When the 80286 processor was introduced into the PC market, there was a
  55.      new variable.  It could address memory above one megabyte, that is
  56.      above an absolute address of FFFFF.  There was now the possibility that
  57.      FFFF:0010 could describe a unique and valid memory location - something
  58.      that couldn't happen on the 8086/8088.  In order to insure backward
  59.      compatibility, the AT and subsequent computers were designed to
  60.      "uncouple" the addressing of the processor from the addressing on the
  61.      motherboard.  This meant that ATs could be expected to behave the same
  62.      as PCs. If you exceeded FFFF:000F, you would "wrap" to the bottom of
  63.      conventional memory.
  64.  
  65.      As memory below 1024k became more and more precious, it came to the
  66.      attention of inventive folks in the PC industry that the 64k of memory
  67.      from 1024 to 1068k was accessible to 286 or later CPUs in REAL mode -
  68.      if only the CPU could be "re-coupled" to motherboard addressing.  Of
  69.      course, the "re-coupling" needed to be selective, so that any code
  70.      relying on the "wrap" at the end of memory would still function.  The
  71.      address line responsible for allowing this access to take place is A20,
  72.      and soon A20 handlers began to appear, such as QEXT.SYS and HIMEM.SYS.
  73.  
  74.      What these A20 handlers do is allow some programs to couple or de-
  75.      couple the addressing between the motherboard and the CPU, thereby
  76.      allowing that program access to the 64k of memory between 1024k and
  77.      1068k without the need to go into PROTECTED mode CPU operation.  This
  78.      64k is referred to as the HMA, or High Memory Area - and to date it may
  79.      be controlled by one client only.
  80.  
  81.      DOS 5.0 is the first DOS version to make use of the HMA for DOS itself,
  82.      though DOS 4.01 shipped with an HMA manager - HIMEM.SYS.  DOS 5.0 does
  83.      much more than provide HIMEM, it uses HIMEM (or a HIMEM compatible XMS
  84.      driver such as QEMM386 v5.12 or 386MAX v5.1) to manage the HMA and load
  85.      a significant portion of the DOS system files into this memory. This is
  86.      done by placing the DOS=HIGH command in the CONFIG.SYS file.
  87.  
  88.      As a result, a 286 or later PC can show as much as a 46k gain in free
  89.      conventional memory after upgrading to DOS 5.0, simply because much of
  90.      resident DOS is now using HMA instead of conventional memory. DOS=HIGH
  91.      will also load BUFFERS into the HMA area.
  92.  
  93.      Because the means of coupling and de-coupling the CPU's addressing from
  94.      the motherboard's addressing is system-specific, and was never
  95.      standardized, the driver must accommodate the various methods that
  96.      computer manufacturers have used.  In order to do this, some drivers,
  97.      such as HIMEM.SYS, require "switches" for particular machines.
  98.  
  99.      Be sure to check the documentation for your software to determine how
  100.      to configure it for your particular machine.  If you are uncertain, or
  101.      if your computer behaves oddly when using the DOS=HIGH command, you
  102.      should check with your computer manufacturer to find out the
  103.      appropriate setup.  The README file with DOS 5.0 lists many of the
  104.      popular computers that require special switches for HIMEM.SYS.
  105.  
  106.      Requirements for HMA use: 286, i386, or i486 CPU-based PC XMS (Extended
  107.      Memory Specification) driver - HIMEM, QEMM386, 386MAX, etc. At least
  108.      64k of extended memory - addressed from 1024k to 1068k.
  109.  
  110.  
  111. ══════════════════════════════════════════════════════════════════════════════
  112. End of file                 Intel FaxBack # 1250          June 24,1992
  113.